PM_FUNC_NORM_ATTRIB SKILL:SkillThunder( SKILL_CALL:iCall, Int:id )
{
	#pragma unused id
	switch( iCall )
	{
		case CALL_REGISTER: return SkillRegister( .Name = "Thunder", .Type = TYPE_ELECTRIC, .callTypes = CALL_BIND_DOWN, .PP = 10, .Charges = 1, .DelayTime = 1.0 );
		case CALL_HELP:     return SkillHelp( "" );
		case CALL_BIND_DOWN:
		{
			return SKILL_USED;
		}
	}
	return SKILL_READY;
}

PM_FUNC_NORM_ATTRIB SKILL:SkillThunderWave( SKILL_CALL:iCall, Int:id )
{
	switch( iCall )
	{
		case CALL_REGISTER: return SkillRegister( .Name = "Thunder Wave", .Type = TYPE_ELECTRIC, .callTypes = CALL_BIND_DOWN, .PP = 20, .Charges = 5, .DelayTime = 5.0 );
		case CALL_HELP:     return SkillHelp( "Damages and paralyzes nearby enemies" );
		case CALL_BIND_DOWN:
		{
			new Coord:cOrigin[3];
			get_user_origin( id, cOrigin );

			new Int:iDamage = StatClamp( id, STAT_ATTACK, 20, 60 );
			new Int:iParalyze = StatClamp( id, STAT_SPECIAL, 5, 10 );
			new Float:fRadius = StatClamp( id, STAT_SPECIAL, 300.0, 700.0 );

			SkillAoEDamage( .attacker = id,
							.cOrigin = cOrigin,
							.fRadius = fRadius,
							.iMaxDamage = iDamage,
							.flags = AOE_IGNORE_ATTACKER|AOE_VICTIM_TEAM
							);

			StatusAoE( .iInflictorID = id,
						.cOrigin = cOrigin,
						.iStatus = STATUS_PARALYZE,
						.fRadius = fRadius,
						.iAmount = iParalyze
						);

			EffectBlastCircle( .cOrigin = cOrigin,
								.iSprite = SPRITE_LGTNING,
								.iRadius = floatround( fRadius ),
								.fLife = 1.0,
								.iWidth = iDamage,
								.iNoise = 20,
								.iRed = 255,
								.iGreen = 255,
								.iBlue = 0,
								.iAlpha = 255
							);

			SoundEmit( id, SOUND_BIGGUN );

			return SKILL_USED_PAUSE;
		}
	}
	return SKILL_READY;
}

PM_FUNC_NORM_ATTRIB SKILL:SkillThunderBolt( SKILL_CALL:iCall, Int:id )
{
	switch( iCall )
	{
		case CALL_REGISTER: return SkillRegister( .Name = "Thunder Bolt", .Type = TYPE_ELECTRIC, .callTypes = CALL_BIND_DOWN|CALL_ENTITY_THINK, .PP = 15, .Charges = 1, .DelayTime = 15.0 );
		case CALL_HELP:     return SkillHelp( "Creates a bolt of lightning that damages and paralyzes" );
		case CALL_BIND_DOWN:
		{
			new Coord:cAimOrigin[3], Vector:vAimOrigin[3];
			PlayerAimOrigin( id, cAimOrigin, .iDist = 300 );
			CoordToVector( cAimOrigin, vAimOrigin );

			new Int:iEnt = EntitySkillCreate( .iPlayer = id,
											.fThinkTime = 1.0,
											.fDmgTime = 1.0,
											.fKillTime = 10.0,
											.iDamage = StatClamp( id, STAT_ATTACK, 10, 40 ),
											.fRadius = 100.0,
											.iProperty = SEP_THINK|SEP_AOEDAMAGE|SEP_KILL,
											.iMoveType = MOVETYPE_NONE,
											.iSolidType = SOLID_NOT,
											.vOrigin = vAimOrigin,
											.bPlayerAngles = true,
											.vMins = Vector:{-1.0,-1.0,-1.0},
											.vMaxs = Vector:{1.0,1.0,1.0}
											);

			EntitySetNum( iEnt, ENTITY_AOETYPE, AOE_IGNORE_ATTACKER|AOE_VICTIM_TEAM );

			cAimOrigin[2] += 2000;

			EffectBeamEntPoint( .iPlayer = 0,
							.iStartEnt = iEnt,
							.cEnd = cAimOrigin,
							.iSprite = SPRITE_LGTNING,
							.iStartFrame = 0,
							.iFrameRate = 10,
							.fLife = 0.5,
							.iLineWidth = 50,
							.iNoiseAmp = 50,
							.iRed = 255,
							.iGreen = 255,
							.iBlue = 0,
							.iAlpha = 255,
							.iScrollSpeed = 10
						);

			return SKILL_USED;
		}
		case CALL_ENTITY_THINK:
		{
			new Int:iEnt = g_iAttacker;

			EntitySoundEmit( iEnt, SOUND_BIGGUN );

			new Vector:vOrigin[3], Coord:cOrigin[3];
			EntityGetOrigin( iEnt, vOrigin );
			VectorToCoord( vOrigin, cOrigin );

			StatusAoE( .iInflictorID = id,
						.cOrigin = cOrigin,
						.iStatus = STATUS_PARALYZE,
						.fRadius = 100.0,
						.iAmount = 1
					);

			for ( new Int:iBeam; iBeam < 4; iBeam++ )
			{
				VectorToCoord( vOrigin, cOrigin );

				if ( iBeam & 1 )
				{
					cOrigin[0] += random_num( 0, 100 );
					cOrigin[1] += random_num( 0, 100 );
				}
				else
				{
					cOrigin[0] += random_num( -100, 0 );
					cOrigin[1] += random_num( -100, 0 );
				}
				cOrigin[2] += random_num( -100, 100 );

				EffectBeamEntPoint( .iPlayer = 0,
								.iStartEnt = iEnt,
								.cEnd = cOrigin,
								.iSprite = SPRITE_LGTNING,
								.iStartFrame = 0,
								.iFrameRate = 10,
								.fLife = 1.0,
								.iLineWidth = 25,
								.iNoiseAmp = 50,
								.iRed = 255,
								.iGreen = 255,
								.iBlue = 0,
								.iAlpha = 255,
								.iScrollSpeed = 10
							);
			}

			VectorToCoord( vOrigin, cOrigin );
			cOrigin[2] += 2000;

			EffectBeamEntPoint( .iPlayer = 0,
							.iStartEnt = iEnt,
							.cEnd = cOrigin,
							.iSprite = SPRITE_LGTNING,
							.iStartFrame = 0,
							.iFrameRate = 10,
							.fLife = 0.5,
							.iLineWidth = 50,
							.iNoiseAmp = 50,
							.iRed = 255,
							.iGreen = 255,
							.iBlue = 0,
							.iAlpha = 255,
							.iScrollSpeed = 10
						);
		}
	}
	return SKILL_READY;
}

PM_FUNC_NORM_ATTRIB SKILL:SkillThunderPunch( SKILL_CALL:iCall, Int:id )
{
	#pragma unused id
	switch( iCall )
	{
		case CALL_REGISTER: return SkillRegister( .Name = "Thunder Punch", .Type = TYPE_ELECTRIC, .callTypes = CALL_BIND_DOWN, .PP = 15, .Charges = 1, .DelayTime = 1.0 );
		case CALL_HELP:     return SkillHelp( "" );
		case CALL_BIND_DOWN:
		{
			return SKILL_USED;
		}
	}
	return SKILL_READY;
}

PM_FUNC_NORM_ATTRIB SKILL:SkillThunderShock( SKILL_CALL:iCall, Int:id )
{
	switch( iCall )
	{
		case CALL_REGISTER: return SkillRegister( .Name = "Thunder Shock", .Type = TYPE_ELECTRIC, .callTypes = CALL_BIND_DOWN|CALL_ENTITY_THINK, .PP = 30, .Charges = 1, .DelayTime = 7.5 );
		case CALL_HELP:     return SkillHelp( "Shocks an area for a short time." );
		case CALL_BIND_DOWN:
		{
			new Coord:cAimOrigin[3], Vector:vAimOrigin[3];
			PlayerAimOrigin( id, cAimOrigin, .iDist = 300 );
			CoordToVector( cAimOrigin, vAimOrigin );

			new Int:iEnt = EntitySkillCreate( .iPlayer = id,
											.fThinkTime = 0.5,
											.fDmgTime = 0.5,
											.fKillTime = 10.0,
											.iDamage = StatClamp( id, STAT_ATTACK, 10, 40 ),
											.fRadius = 100.0,
											.iProperty = SEP_THINK|SEP_AOEDAMAGE|SEP_KILL,
											.iMoveType = MOVETYPE_NONE,
											.iSolidType = SOLID_NOT,
											.vOrigin = vAimOrigin,
											.bPlayerAngles = true,
											.vMins = Vector:{-1.0,-1.0,-1.0},
											.vMaxs = Vector:{1.0,1.0,1.0}
											);

			EntitySetNum( iEnt, ENTITY_AOETYPE, AOE_IGNORE_ATTACKER|AOE_VICTIM_TEAM );

			EffectBeamEnts( .iPlayer = 0,
							.iStartEnt = id,
							.iEndEnt = iEnt,
							.iSprite = SPRITE_LGTNING,
							.iStartFrame = 0,
							.iFrameRate = 10,
							.fLife = 1.0,
							.iLineWidth = 10,
							.iNoiseAmp = 50,
							.iRed = 255,
							.iGreen = 255,
							.iBlue = 0,
							.iAlpha = 255,
							.iScrollSpeed = 10
						);

			return SKILL_USED;
		}
		case CALL_ENTITY_THINK:
		{
			new Int:iEnt = g_iAttacker;

			EntitySoundEmit( iEnt, SOUND_SPARK );

			new Vector:vOrigin[3], Coord:cOrigin[3];
			EntityGetOrigin( iEnt, vOrigin );
			VectorToCoord( vOrigin, cOrigin );

			StatusAoE( .iInflictorID = id,
						.cOrigin = cOrigin,
						.iStatus = STATUS_PARALYZE,
						.fRadius = 100.0,
						.iAmount = 1
					);

			for ( new Int:iBeam; iBeam < 4; iBeam++ )
			{
				VectorToCoord( vOrigin, cOrigin );

				if ( iBeam & 1 )
				{
					cOrigin[0] += random_num( 0, 100 );
					cOrigin[1] += random_num( 0, 100 );
				}
				else
				{
					cOrigin[0] += random_num( -100, 0 );
					cOrigin[1] += random_num( -100, 0 );
				}
				cOrigin[2] += random_num( -100, 100 );

				EffectBeamEntPoint( .iPlayer = 0,
								.iStartEnt = iEnt,
								.cEnd = cOrigin,
								.iSprite = SPRITE_LGTNING,
								.iStartFrame = 0,
								.iFrameRate = 10,
								.fLife = 1.0,
								.iLineWidth = 10,
								.iNoiseAmp = 50,
								.iRed = 255,
								.iGreen = 255,
								.iBlue = 0,
								.iAlpha = 255,
								.iScrollSpeed = 10
							);
			}
		}
	}
	return SKILL_READY;
}




